Method and apparatus to use semantic inference with speech recognition systems

ABSTRACT

A method and apparatus to use semantic inference with speech recognition systems includes recognizing at least one spoken word, processing the spoken word using a context-free grammar, deriving an output from the context-free grammar, and translating the output to a predetermined command.

BACKGROUND OF THE INVENTION FIELD OF THE INVENTION

This invention relates, in one embodiment, generally to speechrecognition systems, and more particularly to using semantic inferencewith speech recognition systems.

COPYRIGHT NOTICE/PERMISSION

A portion of the disclosure of this patent document contains materialthat is subject to copyright protection. The copyright owner has noobjection to the facsimile reproduction by anyone of the patent documentor the patent disclosure as it appears in the Patent and TrademarkOffice patent file or records, but otherwise reserves all copyrightrights whatsoever. The following notice applies to the software and dataas described below and in the drawings hereto: Copyright© 2000, AppleComputer, Inc., All Rights Reserved.

BACKGROUND

Speech recognition enables a computer system to receive voice inputs andconvert them into text. The computer system receives an audio input,transforms the audio input into digital data, compares the digital datawith a list of digitized waveforms corresponding to text, and convertsthe digital data into the text corresponding to the most closely matcheddigitized waveform. One application of speech recognition is voicecommand and control (VCC), which enables a computer user to control acomputer by voice rather than by using traditional user interfaces suchas a keyboard and a mouse. Advances in speech recognition technologyhave enhanced the performance of VCC so that a computer can accuratelyperform a task by recognizing a command spoken within a restricteddomain of vocabulary. However, existing VCC technology has limitationsthat diminish the usefulness of the technology to an average computeruser.

Typical VCC applications employ a context-free grammar, such as a finitestate grammar, that is a compact way of representing an exhaustive listof each and every command that the application can recognize. A finitestate grammar is a particular implementation of a context-free grammar.These applications compare the spoken command to the list of commandsunderlying the context-free grammar. Previously existing VCCapplications that use a context-free grammar either reject orincorrectly recognize any utterance that is semantically accurate butsyntactically out-of-grammar. This rigid framework requires the computeruser to learn and memorize the specific commands that are compiledwithin the context-free grammar.

Semantic inference alleviates the problems associated with VCCapplications that use a context-free grammar. Semantic inference is amore tolerant approach to language modeling that enables a computer torecognize commands that are out-of-grammar but semantically accurate,thereby allowing computer users to say what they mean rather thanrequiring them to speak from an established list of commands. Existingsemantic inference systems replace a context-free grammar in a speechrecognition unit with a statistical language model such as an n-gram.This substitution prevents the speech recognition unit from rejectingout-of-grammar voice inputs before the semantic classification enginehas the opportunity to evaluate the voice input for semantic similarity.A statistical language model makes it possible for the speechrecognition unit to transcribe, with a reasonably low error rate,whatever formulation the computer user chooses for expressing a command.A semantic classification engine then operates on the transcription todetermine the desired action.

Using a statistical language model with the speech recognition unitenables the voice command and control system to accurately identify thecorrect command. However, there are problems associated with semanticinference systems that employ a statistical language model. Substitutinga statistical language model for a context-free grammar in the speechrecognition unit requires a significant change in the overallarchitecture of the speech recognition unit, specifically in thestructure of the search module. Also, estimating the parameters of thestatistical language model typically requires multiple iterations over alarge training corpus of relevant text data, which may involve a largenumber of central processor unit (CPU) cycles. Additionally, developingand maintaining such a large corpus of text data is time-consuming andexpensive. Furthermore, a speech recognition unit using a statisticallanguage model typically requires the computer user to wear ahead-mounted noise-canceling microphone and to train the system to hisor her voice. Finally, n-gram statistical language models havesignificantly larger storage requirements than context-free grammars andlead to greater recognition runtimes.

Therefore, a method and apparatus to use semantic inference with aspeech recognition system using a context-free grammar are required.

SUMMARY OF THE INVENTION

A method and apparatus to use semantic inference with speech recognitionsystems using a context-free grammar is described herein. According toone aspect of the invention, a method for speech recognition comprisesrecognizing at least one spoken word, processing the spoken word using acontext-free grammar, deriving an output from the context-free grammar,and translating the output into a predetermined command.

According to one aspect of the present invention, a machine-readablemedium has stored thereon a plurality of instructions that, whenexecuted by a processor, cause the processor to recognize at least onespoken word, process the spoken word using a context-free grammar,derive an output from said context-free grammar, and translate theoutput into a predetermined command.

According to one aspect of the present invention, an apparatus forspeech recognition includes a processing unit, a memory unit, a systembus, and at least one machine-readable medium. A speech recognitionunit, a context-free grammar, and a semantic inference engine are storedin the machine-readable medium.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is illustrated by way of example and notlimitation in the figures of the accompanying drawings, in which likereferences indicate similar elements and in which:

FIG. 1 is a block diagram illustrating speech recognition in a voicecommand and control system using a context-free grammar according to theprior art;

FIG. 2 is a block diagram illustrating speech recognition in a voicecommand and control system using semantic inference and a statisticallanguage model according to the prior art;

FIG. 3 is a block diagram illustrating speech recognition in a voicecommand and control system using semantic inference and a context-freegrammar according to one embodiment of the present invention;

FIG. 4 is a word graph illustrating a context-free grammar according toone embodiment of the present invention;

FIG. 5 is a word graph illustrating a context-free grammar according toanother embodiment of the present invention;

FIG. 6 is a word graph illustrating a context-free grammar according toanother embodiment of the present invention;

FIG. 7 is a flowchart illustrating the process followed in voice commandand control according to one embodiment of the present invention;

FIG. 8 is a flowchart illustrating the process of training the voicecommand and control system according to one embodiment of the presentinvention;

FIG. 9 is a diagram illustrating the process of training the voicecommand and control system according to another embodiment of theinvention;

FIG. 10 is a flowchart illustrating the process of classifying voiceinput according to one embodiment of the present invention; and

FIG. 11 is a diagram of one embodiment of a computer system suitable foruse with one embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

In the following description, various aspects of the present inventionwill be described. However, it will be understood by those skilled inthe art that the present invention may be practiced with only some orall aspects of the present invention. For purposes of explanation,specific numbers, materials and configurations are set forth in-order toprovide a thorough understanding of the present invention. However, itwill also be apparent to those skilled in the art that the presentinvention may be practiced without these specific details.

Parts of the description will be presented in terms of operationsperformed by a computer system, using terms such as data, flags, bits,values, characters, strings, numbers and the like, consistent with themanner commonly employed by those skilled in the art to convey thesubstance of their work to others skilled in the art. As is wellunderstood by those skilled in the art, these quantities take the formof electrical, magnetic, or optical signals capable of being stored,transferred, combined, and otherwise manipulated through mechanical andelectrical components of the computer system; and the term computersystem includes general purpose as well as special purpose dataprocessing machines, systems, and the like, that are standalone, adjunctor embedded.

Additionally, various operations will be described as multiple discretesteps in turn in a manner that is helpful in understanding the presentinvention. However, the order of description should not be construed asto imply that these operations are necessarily order dependent, inparticular, the order of their presentations.

The present invention provides a method and apparatus to use semanticinference with a speech recognition system using a context-free grammar.A speech recognition unit receives an audio input and generates a stringof words from a vocabulary stored in a context-free grammar. A semanticclassification unit receives the string of words and, using a large-spansemantic language model and semantic anchors created using trainingdata, classifies the voice input as corresponding to a particularcommand. The semantic classification unit sends a semanticrepresentation of the string of words to an action generation unit thatgenerates the appropriate action.

FIG. 1 is a block diagram illustrating speech recognition in a VCCsystem 100 using a context-free grammar 108 according to the prior art.A speech recognition unit 104 receives a voice input 102 and, usingacoustic models 106 and a context-free grammar 108, generates arecognized command 110 from a list constructed from the context-freegrammar 108. A mapping unit 112 receives the recognized command 110 fromthe speech recognition unit 104 as well as rules for mapping 114 fromthe context-free grammar 108. Using the rules for mapping 114, themapping unit 112 maps the recognized command 110 to a list of commandsand generates a representation 116 of the recognized command 110. Anaction generation unit 118 receives the representation 116 of therecognized command 110 and generates an action 120 corresponding to therepresentation 116.

FIG. 2 is a block diagram illustrating speech recognition in a VCCsystem 200 using semantic inference and a statistical language model 208according to the prior art. A speech recognition unit 204 receives avoice input 202 and, using acoustic models 206 and a statisticallanguage model 208, generates a free-text transcription 210 of the voiceinput 202. A semantic classification unit 212 receives the transcription210 and determines the correlation between the transcription 210 and oneor more semantic anchors 214. The semantic classification unit 214classifies the transcription 210 as corresponding to a semantic anchor214 and generates a semantic representation 216 of the transcription210. An action generation unit 218 receives the semantic representation216 and generates a corresponding action 220.

FIG. 3 is a block diagram illustrating speech recognition in a VCCsystem 300 using semantic inference and a context-free grammar 308according to the present invention. According to one embodiment of thepresent invention, the context-free grammar 308 is an extendedcontext-free grammar that generates not only recognized commands from alist of commands, but also any string of words from the list of wordscompiled in the context-free grammar 308. Thus, the extendedcontext-free grammar differs from the context-free grammar 100 used inthe VCC system 100 illustrated in FIG. 1 that generates only recognizedcommands from a list of commands.

A speech recognition unit 304 receives an audio input 301 and, usingacoustic models 306 and a context-free grammar 308, generates a stringof words 310 from a vocabulary stored in the context-free grammar 308.The voice input 302 is audio data that is input to the VCC system 300and is intended to represent any type of audio data. Typically, thevoice input 302 is a digitized representation of a human voice.According to one embodiment of the present invention, the acousticmodels 306 are hidden Markov models. Alternate embodiments can usedifferent types of acoustic models, and any of a variety of conventionalacoustic models other than hidden Markov models can be used.

According to one embodiment of the present invention, the context-freegrammar 308 comprises a vocabulary and all possible interconnectionsbetween the words in the vocabulary. According to another embodiment ofthe present invention, the context-free grammar 308 comprises avocabulary and only those interconnections between the words in thevocabulary that produce strings of words 310 that are identified assyntactically correct. According to another embodiment of the presentinvention, the context-free grammar 308 comprises a vocabulary and allpossible interconnections between the words in the vocabulary, and avocabulary and only those interconnections produce strings of words 310that are identified as syntactically correct. The different types ofcontext-free grammars 308 that can be used with the present inventionare discussed in more detail below.

A semantic classification unit 312 receives the string of words 310 anddetermines the correlation between the string of words 310 and one ormore semantic anchors 314. The correlation is the distance between avector corresponding to the string of words 310 and the vectorscorresponding to the semantic anchors 314. The semantic classificationunit 312 classifies the string of words 310 as corresponding to thesemantic anchor 314 with the closest correlation. The semanticclassification unit 312 sends a semantic representation 316 of thestring of words 310 to an action generation unit 318. The actiongeneration unit 318 receives the semantic representation 316 andgenerates an action 320.

According to one embodiment of the present invention, the VCC system 300separates different strings of words 310 from one another based ondetected pauses between words in the voice input 302. In thisembodiment, if the VCC system 300 detects silence for greater than athreshold period of time, then the VCC system 300 interprets the silenceas a pause between separate strings of words 310 corresponding toseparate commands. The semantic classification unit 312 generates aseparate semantic representation 316 for each separate string of words310. Typical values for this threshold period of time range fromapproximately 300 milliseconds to approximately 3 seconds. In theillustrated implementation, the speech recognition unit 304 detects thepauses and indicates to the semantic classification unit 312 whichstrings of words 310 correspond to separate commands (e.g., by sending asignal to the semantic classification unit 312, or by grouping words ofa string of words 316 together (e.g., by using a linked list)).Alternatively, other methods can be used to identify the beginningand/or ending of a string of words 310, such as a manual input from auser (e.g., selection of a particular box via a graphical user interfaceand a pointer).

The action generation unit 318 uses the semantic representation 316 todetermine the action 320 that is to be taken in response to the voiceinput 302 and generates the action 320. According to one embodiment, theaction generation unit 318 maintains a mapping of possible semanticrepresentations 316 to actions 320 (e.g., system commands to displaytime, open files, close applications, etc.). It is to be appreciatedthat a wide range of commands can be supported by the VCC system 300,with the exact nature of the commands being dependent on the environmentwhere the VCC system 300 is used. The action generation unit 318 is wellknown to those skilled in the art, and thus will not be discussedfurther except as it pertains to the present invention.

FIG. 4 is an example of a word graph for a context-free grammaraccording to one embodiment of the present invention. Construction ofthe context-free grammar is described through explanation of the wordgraph. The word graph comprises a vocabulary and only thoseinterconnections between the words in the vocabulary that producestrings of words that are identified as syntactically correct. Thecontext-free grammar allows eight commands: (i) Open Microsoft Word;(ii) Open Word; (iii) Open Microsoft Excel; (iv) Open Excel; (v) QuitMicrosoft Word; (vi) Quit Word; (vii) Quit Microsoft Excel; and, (viii)Quit Excel. Any spoken command other than one of these eight commands,such as “quit spreadsheet,” is either rejected or matched to the wrongaction.

FIG. 5 is an example of a word graph for a context-free grammaraccording to another embodiment of the present invention. Thecontext-free grammar illustrated in FIG. 5 is an extended context-freegrammar because it is capable of generating any string of words from alist of words compiled in the context-free grammar, not just recognizedcommands from a list of commands. The word graph consists of avocabulary and all possible interconnections between the words in thevocabulary. The word graph illustrated in FIG. 5 corresponds to thesimple task of opening and quitting two computer applications. Thevocabulary in the word graph illustrated in FIG. 4 consists of thefollowing words: (a) Excel; (b) Launch; (c) Microsoft; (d) My; (e) Open;(f) Please; (g) Processor; (h) Quit; (i) Spreadsheet; and ( 0 ) Word.The context-free grammar allows every string of words comprising wordsfrom this vocabulary, such as “Launch My Word Processor” and “QuitMicrosoft Spreadsheet Please.” Because the context-free grammar includesall possible interconnections between the words in the vocabulary, thesemantic classification unit has the opportunity to evaluate voiceinputs that would have been rejected by a speech recognition unit usinga typical context-free grammar that has only those interconnections thatproduce strings of words that are identified as syntactically correct.

According to one embodiment of the present invention, probabilitiesbased on observed or expected frequency are assigned to each grammar arcin the context-free grammar. The greater the number of words in thevocabulary, the greater the likelihood of allowing nonsensical stringsof words. For example, the grammar illustrated in FIG. 5 allowssemantically improper strings of words such as “Word My Please.”Assigning probabilities to each grammar arc reduces the likelihood ofrecognizing a nonsensical string of words.

FIG. 6 is an example of a word graph for a context-free grammaraccording to another embodiment of the present invention. Thecontext-free grammar illustrated in FIG. 6 is an extended context-freegrammar because it is capable of generating any string of words from alist of words compiled in the context-free grammar, not just recognizedcommands from a list of commands. The word graph comprises two wordsub-graphs. The first word sub-graph comprises a vocabulary and onlythose interconnections between the words in the vocabulary that producestrings of words that are syntactically correct. The second wordsub-graph comprises the underlying vocabulary from the first wordsub-graph and all interconnections between the words in the vocabulary.The context-free grammar allows all eight commands allowed by thecontext-free grammar illustrated in FIG. 4. Furthermore, thecontext-free grammar allows every string of words comprising words fromthe underlying vocabulary.

FIG. 7 is a flowchart illustrating the process followed in performingspeech recognition in a VCC system according to one embodiment of thepresent invention. Initially, the VCC system is trained, step 702. Thistraining can be done by the manufacturer (e.g., entering training datawhen the system is built) and/or by the user (e.g., the user speaking inthe training data). In the illustrated embodiment, once the VCC systemis initially trained, no further training is necessary for commandrecognition. However, additional training may optionally be performed bya user, such as to customize the VCC system to a particular user'svoice.

After the VCC system is trained, a voice input is eventually received,step 704. The voice input is then recognized by the speech recognitionunit, step 706. The recognized voice input (e.g., the words of the inputcommand) is then classified by the semantic classification unit, step708. This classification process identifies, based on the semanticanchors, which command was actually input, and generates a semanticrepresentation of the voice input. The semantic representation is thenused by the action generator to carry out the desired action, step 710.As discussed in more detail below, the classification performed by thesemantic classification unit (e.g., semantic classification unit 312 ofFIG. 3) is based on the semantics or actual words that are part of thecommand rather than the grammar of the command.

FIG. 8 is a flowchart illustrating the process of training the commandrecognition system according to one embodiment of the present invention.According to one implementation, FIG. 8 illustrates the process of step702 of FIG. 7 in more detail. Training data is entered into the systemand mapped to a vector space having a particular dimension. For ease ofexplanation, in the discussions to follow the training data is referredto as sentences. However, it is to be appreciated that the training datacan be sentences, phrases, or other word groupings. Instances of suchunits associated with a particular command form what may be referred toas a “document” pertaining to that command. It will be appreciated thattypically, in the context of the present invention, a document is acommand. In the illustrated embodiment, the mapping is performed using amodification of a paradigm first formulated in the context ofinformation retrieval, called latent semantic analysis, which relies ona singular value decomposition of a word-document correlation matrix.

The word-document correlation matrix tabulates the number of times eachword occurs in each document. Assuming that the training databaseincludes K documents and a total of M different words, and assuming thatthe words form the rows of the matrix and the documents form thecolumns, then each element (i, j) of the matrix indicates how many timesthe corresponding word M_(i) occurs in the document K_(j). Each documentfrom a column of the word-document correlation matrix can be representedas a single vector containing M values, with the resulting vectorsdefining a mapping between the vocabulary and a vector space ofdimension M. As discussed in more detail below, this mapping can berefined by performing a singular value decomposition of theword-document correlation matrix, in which case the vector space isreduced to a dimension R, where R<M.

As illustrated in FIG. 8, one or more sentences for each commanddocument are first received, step 802. A “command document” refers to acollection of one or more sentences, phrases, or other word groupingsall intended to identify the same command. For example, a commanddocument for the command to display the current time could include theword groupings “tell me what time it is”, “what time is it”, “displaytime”, etc.

The word-document correlation matrix is then generated, step 804.According to one embodiment of the present invention, the word-documentcorrelation matrix is generated by determining the number of times eachof the M words occurs in each of the K command documents. By way ofexample, if the command document for the command to display the currenttime includes the word groupings “tell me what time it is”, “what timeis it”, and “display time”, then the counts of the number of times eachof the M words appear in the word-document correlation matrix for thecommand to display the current time are illustrated in Table I. Countsfor all other words in the word-document correlation matrix for thecommand to display the current time are zero. TABLE I Word Count display1 is 2 it 2 me 1 tell 1 time 3 what 2

A singular value decomposition of the word-document matrix having anorder of decomposition of R is then generated, step 806. The value of Rcan vary depending on the values of M and K, and by balancingcomputational speed (associated with lower values of R) against accuracy(associated with higher values of R). Typical values for R range from 5to 50. The singular value decomposition is generated according to thefollowing calculation:W=USV^(T)   (1)where U represents the M x R matrix of left singular vectors, V^(T)represents the transposition of the K×R matrix of right singularvectors, and S represents the R×R diagonal matrix of singular values.The generation of the left and right singular vectors, as well as thediagonal matrix of singular values, is well-known to those skilled inthe art and thus will not be discussed further.

Given the singular value decomposition from calculation (1), aparticular document d_(j) of W can be determined based on the jth rightsingular vector v_(j) according to the following calculation:d_(j)=USv_(j) ^(T)   (2)

Further, based on calculation (2) and using well-known mathematicalfunctions and properties, the value of the jth right singular vectorv_(j) can be calculated according to the following:v_(j)=d_(j) ^(T)US⁻¹   (3)

It is to be appreciated that the value US⁻¹ does not change fordifferent values of j, and therefore the value US⁻¹ can bepre-calculated, step 808, and used during classification of input valuesas discussed in more detail below. This pre-calculation reduces thecomputation required during command classification, thereby increasingthe speed of the command recognition system during operation.

Thus, from the training data a large-span semantic vector space having adimension R is created. Each document from the training data results ina different semantic anchor within that vector space. Furthermore, eachof the semantic anchors is based on the actual words of the trainingdata rather than the grammar used in the training data. The semanticanchors are used in classifying input data as a particular command, asdiscussed in more detail below.

FIG. 9 is a diagram illustrating the process of training the commandrecognition system according to another embodiment of the presentinvention. One or more sentences for each document are received. Aword-sentence correlation matrix 902 is generated by determining thenumber of times each of the words occurs in each of the sentences. Byway of example, assume that the VCC system is trained for two commands.The document for the first command to display the time includes thesentences “tell me what time it is,” “what time is it,” and “displaytime.” The document for the second command to display the date includesthe sentences “tell me what date it is,” “what date is it” and “displaydate.” The counts of the number of times each word appears in theword-sentence matrix for these four commands are illustrated in TableII. TABLE II Word Count 1 Count 2 Count 3 Count 4 Count 5 Count 6display 0 0 1 0 0 1 is 1 1 0 1 1 0 it 1 1 0 1 1 0 me 1 0 0 1 0 0 tell 10 0 1 0 0 time 1 1 1 0 0 0 what 1 1 0 1 1 0 date 0 0 0 1 1 1The first three counts in Table 2 represent the three sentences thatcorrespond to the document for displaying the time. The second threecounts in Table 2 represent the three sentences that correspond to thedocument for displaying the date.

As shown in FIG. 9, a singular value decomposition 904 of theword-sentence matrix 902 is then generated. The singular valuedecomposition 904 can be represented in a semantic inference space 906.Given the singular value decomposition 904, a particular sentence andright singular vector can be calculated. The sentences are clustered 906according to their corresponding documents, and the clusters can berepresented in the semantic inference space 910. The centroid iscalculated 912 for each cluster of sentences, and the centroids can berepresented in the semantic inference space 914. Each centroidrepresents a separate document and therefore a separate semantic anchor.The centroids are used in classifying input data as corresponding to aparticular command.

FIG. 10 is a flowchart illustrating the process followed in classifyingvoice input according to one embodiment of the present invention.According to one implementation, FIG. 10 illustrates the process of step708 of FIG. 7 in more detail. As illustrated, a vector is firstgenerated for the received command, step 1002.

When the word(s) of a new command are received from the speechrecognizer, the semantic classifier creates a new command vector d_(p)of order M that identifies the number of occurrences of each of the Mwords in the new data transcription, step 1002. The classifier thendetermines the value of the right singular vector v_(p) corresponding tothis new data transcription, step 1004, according to the followingcalculation (similar to calculation (3) discussed above):v_(p)=d_(p) ^(T)US⁻¹   (4)

As discussed above, US⁻¹ is pre-computed. Therefore, the onlycomputation which occurs at this step is the matrix multiplication ofd_(p) ^(T) by the pre-computed value US⁻¹. The result of calculation(4), v_(p), is a representation of the new data transcription in thevector space R.

The classifier then identifies one or more semantic anchors to be usedfor comparison to the vector v_(p), step 1006. According to oneembodiment of the present invention, all of the anchors generated fromthe training data are used for comparison, and thus all are identifiedin step 1006. Alternatively, the vectors can be clustered into differentgroups, each including a subset of the anchors from the training data.Any of a variety of clustering algorithms, such as bottom-up clustering,can be used. Clustering algorithms are well-known to those skilled inthe art, and thus will not be discussed further except as they pertainto the present invention.

The classifier then compares the representation of the new datatranscription (v_(p)) to one or more of the different anchors in thevector space previously calculated from the training data, step 1008. A“distance” between the new data transcription vector and each of the oneor more vectors is then determined, with the “distance” representing thesimilarity between the vectors. Two vectors which are similar have asmall distance between one another, whereas vectors which are lesssimilar have larger distances between one another. The classifierassigns the new data transcription vector to the training vector that isclosest to the new vector, step 1010.

The distance between the new data transcription vector v_(p) and avector v_(j) from the training data can be calculated in a variety ofdifferent manners. According to one embodiment of the present invention,the distance z between the new data transcription vector v_(p) and avector v_(j) from the training data is determined by calculating theinverse cosine of the similarity between v_(p)S and v_(j)S according tothe following calculation: $\begin{matrix}{z = {\cos^{- 1}\frac{v_{p}S^{2}v_{j}^{T}}{{{v_{p}S}}{{v_{j}S}}}}} & (5)\end{matrix}$

According to an alternate embodiment of the present invention, thedistance z between the new data transcription vector v_(p) and one ofthe vectors v_(j) from the training data is determined by calculatingthe Euclidean distance between the two vectors according to thefollowing calculation: $\begin{matrix}{z = \sqrt{\sum\limits_{i = 1}^{R}\left( {\left( v_{p} \right)_{i} - \left( v_{j} \right)_{i}} \right)^{2}}} & (6)\end{matrix}$The comparison process in steps 1008 and 1010 can be accomplished in avariety of manners. According to another embodiment, comparisons for allof the identified anchors are made and the anchor that is most similarto the data transcription vector v_(p) is selected. According to analternate embodiment, as soon as an anchor that is less than a thresholddistance from the data transcription vector v_(p) is discovered, thecomparison process ends and that anchor is determined to be the“closest” in step 1010.

Thus, as can be seen in FIG. 10, the classification of the input commandis performed using a data-driven semantic inference. It is arepresentation of the words of the command that is compared to therepresentations of the words of the commands in the training data inorder to classify the input.

FIG. 11 illustrates one embodiment of a computing device suitable foruse with one embodiment the present invention. According to oneimplementation, the voice command and control system 300 of FIG. 3 is ahardware system 1100 of FIG. 11. In the illustrated embodiment of FIG.1, system 1100 includes processor 1102, display device 1104, andinput/output (I/O) devices 1106, coupled to each other via a bus 1108.Additionally, a memory subsystem 1110, which can include one or more ofcache memories, system memory (RAM), and nonvolatile storage devices(e.g., magnetic or optical disks) is also coupled to bus 1108 forstorage of instructions and data for use by processor 1102. I/O devices1106 represent a broad range of input and output devices, includingkeyboards, cursor control devices (e.g., a trackpad or mouse),microphones, speakers, network or telephone communication interfaces,printers, etc. Hardware system 1100 also includes well-known audioprocessing hardware and/or software to transform analog voice data to adigital form which can be processed by system 1100.

These elements 1102-1110 perform their conventional functions known inthe art. Collectively, these elements are intended to represent a broadcategory of hardware systems, including but not limited to generalpurpose computer systems based on the PowerPC® processor family ofprocessors available from Motorola, Inc. of Schaumburg, Ill., or thePentium® processor family of processors available from Intel Corporationof Santa Clara, Calif.

It is to be appreciated that various components of hardware system 1100may be re-arranged, and that certain implementations of the presentinvention may not require nor include all of the above components. Forexample, a display device may not be included in system 1100.Additionally, multiple buses (e.g., a standard I/O bus and a highperformance I/O bus) may be included in system 1100. Furthermore,additional components may be included in system 1100, such as additionalprocessors (e.g., a digital signal processor), storage devices,memories, network/communication interfaces, etc.

In the illustrated embodiment of FIG. 11, the method and apparatus forcommand recognition using data driven semantic inference according tothe present invention as discussed above is implemented as a series ofsoftware routines run by hardware system 1100 of FIG. 11. These softwareroutines comprise a plurality or series of instructions to be executedby a processor in a hardware system, such as processor 1102 of FIG. 11.Initially, the series of instructions are stored on a storage device ofmemory subsystem 1110. It is to be appreciated that the series ofinstructions can be stored using any conventional storage medium, suchas a diskette, CD-ROM, magnetic tape, DVD, RAM, ROM, Flash memory, etc.It is also to be appreciated that the series of instructions need not bestored locally, and could be received from a remote storage device, suchas a server on a network, via a network/communication interface. Theinstructions are copied from the storage device, such as mass storage,into system memory and then accessed and executed by processor 1102. Inone implementation, these software routines are written in the C++programming language. It is to be appreciated, however, that theseroutines may be implemented in any of a wide variety of programminglanguages.

These software routines are illustrated in memory subsystem 1110 asspeech recognition instructions 1112, semantic classificationinstructions 1114, action generation instructions 1116, and traininginstructions 1118. Also illustrated are analog to digital (A/D)transformation instructions 1120, acoustic model(s) 1122, languagemodel(s) 1124, and semantic anchors 1126.

In alternate embodiments, the present invention is implemented indiscrete hardware or firmware. For example, one or more applicationspecific integrated circuits (ASICs) could be programmed with the abovedescribed functions of the present invention. By way of another example,the speech recognition unit 304, semantic classification unit 312, andaction generation unit 318 of FIG. 3 could be implemented in one or moreASICs of an additional circuit board for insertion into the hardwaresystem 1100 of FIG. 11.

In the discussions above, the present invention is described withreference to voice recognition systems. It is to be appreciated,however, that alternate embodiments of the present invention can be usedwith other types of pattern recognition systems, such as visual ratherthan audio pattern recognition, handwriting recognition systems (e.g.,optical character recognition (OCR)), etc.

It is to be appreciated that the command recognition system of thepresent invention can be employed in any of a wide variety of manners.By way of example, the command recognition system could be used inconventional personal computers, security systems, home entertainment orautomation systems, etc.

Therefore, a command recognition using data-driven semantic inferencehas been described. An audio input is provided to a speech recognizerthat identifies the words in the input. These recognized words are thenprovided to a semantic classifier that classifies the input ascorresponding to a particular command. This classification process isadvantageously based on a data-driven semantic representation of theinput rather than on a grammar-based approach. The appropriate action,based on the particular command, can then be generated. The data-drivensemantic representation of the present invention advantageously allowsthe present invention to adapt to and accurately identify differentcommand wordings.

Thus, a method and apparatus to use semantic inference with a speechrecognition system using a context-free grammar has been described.Whereas many alterations and modifications of the present invention willbe comprehended by a person skilled in the art after having read theforegoing description, it is to be understood that the particularembodiments shown and described by way of illustration are in no wayintended to be considered limiting. References to details of particularembodiments are not intended to limit the scope of the claims.

1. A machine-implemented method for speech recognition comprising:recognizing at least one spoken word; processing said spoken word usinga context-free grammar; deriving an output from said context-freegrammar; and translating said output into a predetermined command. 2.The method of claim 1 further comprising performing an actioncorresponding to said predetermined command.
 3. The method of claim 1wherein said translating comprises semantically inferring saidpredetermined command from said output.
 4. The method of claim 3 whereinsaid predetermined command is a semantic anchor.
 5. The method of claim1 wherein said output is a string of recognized words.
 6. The method ofclaim 1 further comprising mapping said output to a vector space.
 7. Themethod of claim 6 wherein said vector space is derived from trainingdata.
 8. The method of claim 6 further comprising determining at leastone distance within said vector space between said output and aplurality of predetermined commands.
 9. The method of claim 8 furthercomprising selecting the predetermined command that is closest indistance within said vector space to said output.
 10. The method ofclaim 1 wherein said context-free grammar is an extended context-freegrammar.
 11. The method of claim 1 wherein: said output comprises aplurality of words; and selecting said predetermined command is notaffected by the order of said words within said output.
 12. Amachine-readable medium having machine-executable instructions to acause a machine to perform a method comprising: recognizing at least onespoken word; processing said spoken word using a context-free grammar;deriving an output from said context-free grammar; and translating saidoutput into a predetermined command.
 13. The machine-readable medium ofclaim 12 wherein the machine-executable instructions cause the machineto perform a method further comprising performing an actioncorresponding to said predetermined command.
 14. The machine-readablemedium of claim 12 wherein the machine-executable instructions cause themachine to perform a method wherein said translating comprisessemantically inferring said predetermined command from said output. 15.The machine-readable medium of claim 14 wherein the machine-executableinstructions cause the machine to perform a method wherein saidpredetermined command is a semantic anchor.
 16. The machine-readablemedium of claim 12 wherein the machine-executable instructions cause themachine to perform a method wherein said output is a string ofrecognized words.
 17. The machine-readable medium of claim 12 whereinthe machine-executable instructions cause the machine to perform amethod further comprising mapping said output to a vector space.
 18. Themachine-readable medium of claim 17 wherein the machine-executableinstructions cause the machine to perform a method wherein said vectorspace is derived from training data.
 19. The machine-readable medium ofclaim 17 wherein the machine-executable instructions cause the machineto perform a method further comprising determining at least one distancewithin said vector space between said output and a plurality ofpredetermined commands.
 20. The machine-readable medium of claim 19wherein the machine-executable instructions cause the machine to performa method further comprising selecting the predetermined command that isclosest in distance within said vector space to said output.
 21. Themachine-readable medium of claim 12 wherein the machine-executableinstructions cause the machine to perform a method wherein saidcontext-free grammar is an extended context-free grammar.
 22. Themachine-readable medium of claim 12 wherein the machine-executableinstructions cause the machine to perform a method wherein: said outputcomprises a plurality of words; and selecting said predetermined commandis not affected by the order of said words within said output.
 23. Amachine-readable medium having machine-executable instructions to causea machine to perform a method comprising: recognizing at least onespoken word; processing said spoken word using a context-free grammar;deriving an output from said context-free grammar; and converting saidoutput to at least one predetermined command using semantic inference.24. A machine comprising: a processing unit; a memory unit coupled tosaid processing unit by a system bus; at least one machine-readablemedium coupled to said processing unit by said system bus; a speechrecognition unit stored in said machine-readable medium; a context-freegrammar stored in said machine-readable medium; and a semantic inferenceengine stored in said machine-readable medium.
 25. The machine of claim24 wherein said speech recognition unit comprises instructions causingsaid processing unit to recognize at least one spoken word.
 26. Themachine of claim 25 wherein said context-free grammar comprisesinstructions causing said processing unit to process said spoken word.27. The machine of claim 26 wherein said context-free grammar comprisesinstructions causing said processing unit to derive an output.
 28. Themachine of claim 27wherein said output is a string of recognized words.29. The machine of claim 27 wherein said semantic inference enginecomprises instructions causing said processing unit to translate saidoutput into a predetermined command.
 30. The machine of claim 29 whereinsaid processor performs an action corresponding to said predeterminedcommand.
 31. The machine of claim 29 wherein said semantic inferenceengine further comprises instructions causing said processing unit tomap said output to a vector space.
 32. The machine of claim 31 whereinsaid vector space is derived from training data.
 33. The machine ofclaim 31 wherein said semantic inference engine further comprisesinstructions causing said processing unit to determine at least onedistance within said vector space between said output and a plurality ofpredetermined commands.
 34. The machine of claim 31 wherein saidsemantic inference engine further comprises instructions causing saidprocessing unit to select the predetermined command that is closest indistance within said vector space to said output.
 35. The machine ofclaim 24 wherein said context-free grammar is an extended context-freegrammar.
 36. The machine of claim 27 wherein: said output comprises aplurality of words; and said predetermined command is not affected bythe order of said words within said output.
 37. A computerized systemcomprising: means for recognizing at least one spoken word; means forprocessing said spoken word; means for deriving an output correspondingto said spoken word; and means for converting said output to at leastone predetermined command.
 38. The machine of claim 37 furthercomprising means for executing an action corresponding to apredetermined command.